package dao.domain;

import java.util.Date;

/**
 * @author gzb
 * @Date 2023/9/21
 */
public class Order {
    /**
     * 订单号
     */
    private int id;
    /**
     * 用户对象
     */
    private Client client;
    /**
     * 书对象
     */
    private Book book;
    /**
     * 借阅时间
     */
    private Date orderDate;

    public Order() {
    }

    public Order(int id, Client client, Book book, Date orderDate) {
        this.id = id;
        this.client = client;
        this.book = book;
        this.orderDate = orderDate;

    }

    @Override
    public String toString() {
        return "id:" + id + "\t" +
                "client" + client.getAccount() + "\t" +
                "book" + book.getNumber() + "\t" +
                "orderData" + orderDate;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public Date getOrderDate() {
        return orderDate;
    }

    public void setOrderDate(Date orderDate) {
        this.orderDate = orderDate;
    }

    public Client getClient() {
        return client;
    }

    public void setClient(Client client) {
        this.client = client;
    }

    public Book getBook() {
        return book;
    }

    public void setBook(Book book) {
        this.book = book;
    }

}
